/*****************************************************************************
 * Open MCT, Copyright (c) 2014-2016, United States Government
 * as represented by the Administrator of the National Aeronautics and Space
 * Administration. All rights reserved.
 *
 * Open MCT is licensed under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0.
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 *
 * Open MCT includes source code licensed under additional open source
 * licenses. See the Open Source Licenses file (LICENSES.md) included with
 * this source code distribution or the Licensing information page available
 * at runtime from the About dialog for additional information.
 *****************************************************************************/
/* Styles for the Inspector pane */

.l-inspect,
.l-inspect table tr td {
    font-size: 0.75rem;
}

.l-inspect {
    @extend .abs;
    background: $colorInspectorBg;
    color: $colorInspectorFg;
    line-height: 140%;

    .flex-elem.holder:not(:last-child) {
        margin-bottom: $interiorMargin;
    }

    .pane-header {
        color: pushBack($colorInspectorFg, 20%);
        font-size: 0.8rem;
    }

    .split-layout {
        .split-pane-component.pane {
            &.bottom {
                height: 30%;
                min-height: 20%;
                max-height: 80%;
            }
        }
    }
    .l-inspector-part {
        box-sizing: border-box;
        padding-right: $interiorMargin;
        .tree .form {
            margin-left: $treeVCW + $interiorMarginLg;
        }
        .section-header {
            background: none;
            color: $colorInspectorPropName;
            border-radius: unset;
            font-size: inherit;
            padding: $interiorMarginSm 0;
        }

        mct-form:not(:last-child) .form {
            border-bottom: 1px solid $colorInspectorSectionHeaderBg;
        }

        .form {
            margin-bottom: $interiorMarginSm;
            padding-bottom: $interiorMarginLg;
            .l-section-body {
                margin-bottom: 0;
                &:not(.first) {
                    border-top: 1px solid $colorFormLines;
                }
                .form-row {
                    @include align-items(center);
                    border: none;
                    padding: $interiorMarginSm 0;
                    .label {
                        min-width: 80px;
                    }
                    input[type='text'],
                    input[type='search'] {
                        width: 100%;
                    }
                }
            }
        }
    }

    ul li,
    em.t-inspector-part-header {
        display: block;
        position: relative;
    }

    ul li {
        margin-bottom: $interiorMarginLg;
    }

    em.t-inspector-part-header {
        border-radius: $basicCr;
        background-color: $colorInspectorSectionHeaderBg;
        color: $colorInspectorSectionHeaderFg;
        margin-bottom: $interiorMargin;
        padding: floor($formTBPad * .75) $formLRPad;
        text-transform: uppercase;
    }

    .inspector-properties {
        &:not(.first) {
            border-top: 1px solid $colorInspectorSectionHeaderBg;
        }
        padding: $interiorMarginSm 0;
        .label {
            color: $colorInspectorPropName;
            text-transform: uppercase;
        }
        .value {
            color: $colorInspectorPropVal;
            word-break: break-all;
        }
    }

    .inspector-location {
        .location-item {
            $h: 1.2em;
            box-sizing: border-box;
            cursor: pointer;
            display: inline-block;
            line-height: $h;
            position: relative;
            padding: 2px 4px;
            .t-object-label {
                .t-item-icon {
                    height: $h;
                    width: 0.7rem;
                }
            }
            &:hover {
                background: $colorItemTreeHoverBg;
                color: $colorItemTreeHoverFg;
                .icon {
                    color: $colorItemTreeIconHover;
                }
            }
        }
        &:not(.last) .t-object-label .t-title-label:after {
            color: pushBack($colorInspectorFg, 15%);
            content: '\e904';
            display: inline-block;
            font-family: symbolsfont;
            font-size: 8px;
            font-style: normal !important;
            line-height: inherit;
            margin-left: $interiorMarginSm;
            width: 4px;
        }
    }
    .holder-elements {
        .current-elements {
            position: relative;
            .tree-item {
                .t-object-label {
                    // Elements pool is a flat list, so don't indent items.
                    font-size: 0.75rem;
                    left: 0;
                }
            }
        }
    }
}

.l-inspect {
    .splitter-inspect-panel,
    .split-pane-component.pane.bottom {
        @include trans-prop-nice(opacity, 250ms); // Not working as desired currently; entire inspector seems to be destroyed and recreated when switching into and out of edit mode.
        opacity: 0;
        pointer-events: none;
    }
}

mct-representation:not(.s-status-editing) .l-inspect {
    .split-pane-component.pane.top {
        bottom: 0 !important;
    }
}

.s-status-editing .l-inspect {
    .location-item {
        pointer-events: none;
    }
    .splitter-inspect-panel,
    .split-pane-component.pane.bottom {
        opacity: 1;
        pointer-events: inherit;
    }
}
